public class YourClass extends Component { // value to control the Camera rendering distance public float distance = 500f; // select in properties // creates a new SUIButton public SUIButton button; // select in properties // creates a new Camera public Camera camera; // select in properties @Override public void start() { } @Override public void repeat() { // checking if the button was pressed if (button.isDown()) { // changing the Camera rendering distance if the conditional is true camera.setRenderDistance(distance); } } }